<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>测试</title>
</head>
<body>
</body>
<script src="jquery-3.6.1.min.js"></script>
<script>
    setInterval(()=>{
        $.get("http://localhost:8081/news/page?pageNum="+generate_rand_num(0,10000)+"&pageSize=10", function(result){
            console.log(result);
        })
    },50)



    //生成min_v到max_v之间的随机数
    function generate_rand_num(min_v, max_v) {
        //min_v下限，max_v上限
        var rand_num = parseInt(Math.random() * (max_v - min_v + 1) + min_v);
        return rand_num
    }
</script>
</html>